export default function(ops){

    const ele = document.createElement("dialog");
    ele.innerHTML = ops.text || "默认提示";
    document.body.appendChild(ele);
    ele.style.display = "block";

    if(ops.closeType === "click"){
        ele.onclick= function(){
            ele.remove();
            ops.close && ops.close();
        }
    }else{
        setTimeout(()=>{
            ele.remove();
            ops.close && ops.close();
        },2000)
    }

}
